/**计算机报名信息 */
<template>
  <div>
    <div v-if="indexSee === 1">
      <condition-card @reset="resetSearch" @search="onSearch" label-position="right" label-width="150px">
        <el-row :gutter="24" style="height: 50px;">
          <el-col :span="8">
            <el-form-item :label="$t('subjectCompetitionBase.semester')">
              <CalendarSelect v-model="queryForm.condition.calendarId" @load-done="loadDone" @input='changeInput'></CalendarSelect>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="当前年级">
              <el-date-picker style="width:100%" @change="collegeChangeList" v-model="queryForm.condition.entranceYear" value-format="yyyy" type="year">
              </el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item :label="$t('graduate.college')">
              <el-select v-model="queryForm.condition.college" @change="collegeChange" filterable clearable style="width: 100%">
                <el-option v-for="item in options.faculty" :key="item.value" :label="item.label" :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>

          <el-col :span="8">
            <el-form-item :label="$t('graduate.major')">
              <el-select v-model="queryForm.condition.major" filterable clearable style="width: 100%">
                <el-option v-for="item in options.profession" :key="item.value" :label="item.label" :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item :label="$t('computational.campus')">
              <el-select collapse-tags v-model="queryForm.condition.campus" clearable style="width: 100%">
                <el-option v-for="item in options.limitCampus" :key="item.value" :label="item.label" :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <!-- <el-col :span="8">
            <el-form-item :label="$t('computational.subject')">
              <el-select collapse-tags v-model="queryForm.condition.subjectCode" clearable style="width: 100%">
                <el-option v-for="item in TrainingLevel" :key="item.value" :label="item.label" :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col> -->
          <el-col :span="8">
            <el-form-item label="准考证导入状态">
              <el-select v-model="queryForm.condition.importCardStatus" clearable style="width: 100%">
                <el-option
                  v-for="item in CardStatusList"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
      </condition-card>
      <el-card shadow="never" v-loading="loading" body-style="padding: 24px;" class="card-margin">
        <h1 class="condition-title">{{$t('computational.information')}}</h1>
        <div class="float-left">
          <el-input v-model.trim="queryForm.condition.studentIdOrName" :placeholder="$t('computational.nameSearch')" style="width:250px" @keyup.enter.native="onSubmit">
            <i slot="suffix" class="el-icon-search" style="margin-top:10px;cursor:pointer" @click="onSubmit">
            </i>
          </el-input>
        </div>
        <div class="edu-opertion-bar sub-title">
          <div class="float-right" style="display: flex;">
            <el-dropdown @command="handleCommand" style="margin-right:10px">
              <el-button>
                导入准考证
                <i class="el-icon-arrow-down el-icon--right"></i>
              </el-button>
              <el-dropdown-menu slot="dropdown">
                <el-dropdown-item command="import">导入准考证</el-dropdown-item>
                <el-dropdown-item command="download">{{$t('message.down')}}</el-dropdown-item>
              </el-dropdown-menu>
            </el-dropdown>
            <el-button type="primary" @click="batchClick">批量打印准考证</el-button>
            <el-button v-if="permitToImport" type="primary" @click="importAuditRosterClick">{{$t('mandarin.importAuditRoster')}}</el-button>
            <el-button type="primary" @click="exportAuditRoster">{{$t('common.btn.export')}}</el-button>
          </div>
        </div>
        <edu-table :pagination="false" :order='false' :tooltipEffect="tooltipEffect" stripe :data="dataList" size="mini" @selection-change="handleSelectionChange">
          <edu-table-column :label="$t('computational.name')" prop="studentName"></edu-table-column>
          <edu-table-column :label="$t('computational.gender')" prop="sex"></edu-table-column>
          <edu-table-column :label="$t('computational.certificateType')" prop="idCardType"></edu-table-column>
          <edu-table-column :label="$t('computational.idNumber')" prop="idCardNo"></edu-table-column>
          <edu-table-column :label="$t('computational.collegeCode')" prop="college"></edu-table-column>
          <edu-table-column :label="$t('computational.academicDegrees')" prop="subject"></edu-table-column>
          <edu-table-column :label="$t('computational.major')" prop="major"></edu-table-column>
          <edu-table-column :label="$t('computational.examineeType')" prop="examStudentType" width='150px'></edu-table-column>
          <edu-table-column :label="$t('computational.enrollmentYear')" prop="entranceYear" width='150px'></edu-table-column>
          <edu-table-column :label="$t('computational.eductional')" prop="educationSystem" width='150px'></edu-table-column>
          <edu-table-column :label="$t('computational.classGrade')" prop="className" width='150px'></edu-table-column>
          <edu-table-column :label="$t('computational.studentNumber')" prop="studentId" width='150px'></edu-table-column>
          <!-- <edu-table-column :label="$t('computational.accountCode')" prop="competitionType" width='150px'></edu-table-column> -->
          <edu-table-column label="准考证导入状态" prop="cardId" min-width="120">
            <template slot-scope="scope">
              {{ scope.row.cardId?'导入':'未导入'}}
            </template>
          </edu-table-column>
          <el-table-column :label="$t('message.operating')" fixed="right" width="110">
            <template slot-scope="scope">
              <div>
                <el-button v-if="scope.row.status==1&&scope.row.cardId" type="text" @click.stop="SeeClick(scope.row)">查看准考证</el-button>
              </div>
            </template>
          </el-table-column>
          <!-- <edu-table-column :label="$t('graduate.auditStatus')">
            <template slot-scope="props">
              <span v-if="props.row.status == 0">待提交</span>
              <span v-if="props.row.status == 1">待审核</span>
              <span v-if="props.row.status == 2">审核通过</span>
              <span v-if="props.row.status == 3">驳回</span>
              <span v-if="props.row.status == null">待录入</span>
            </template>
          </edu-table-column> -->
        </edu-table>
        <el-row type="flex" class="row-bg" justify="end">
          <el-col>
            <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="queryForm.pageNum_" :page-sizes="[20, 40, 80, 100]" :page-size="queryForm.pageSize_" layout="total, sizes, prev, pager, next, jumper" :total="queryForm.total_" style="float:right;margin-top:10px"></el-pagination>
          </el-col>
        </el-row>
      </el-card>
      <edu-export-dialog :disabled="exportButton" :title="$t('message.prompt')" ref="downloadRef" :data="exportResult">
      </edu-export-dialog>
      <!-- 准考证信息导入 -->
      <!-- @confirm="handleImportConfirm" -->
      <edu-dialog :title="$t('message.import')" width="400px" ref="importDialog" class="importDialogClass" @confirm="handleImportConfirm">
        <el-row>
          <el-col :span="24">
            <el-form>
              <el-row>
                <!-- <el-col :span="8" style="margin-right:20px">
                  <el-form-item :label="$t('label.schoolTerm')">
                    <CalendarSelect v-model="calendarId" @change="calendarChange" @load-done="loadDone"></CalendarSelect>
                  </el-form-item>
                </el-col> -->
                <el-col :span="16">
                  <span class="spanClass">*</span>
                  <el-form-item label="考试">
                    <el-select  v-model="competitionId" clearable style="width: 100%" @change="competitionIdChange">
                      <el-option v-for="item in competitionidList" :key="item.id" :label="item.title" :value="item.id">
                      </el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row>
                <div v-if="competitionIdTip" style="color:red;margin-bottom: 14px;">请选择考试</div>
              </el-row>
              <el-row v-if="!this.command">
                <el-col :span="8">
                  <el-form-item>
                    <el-upload  ref="upload" :data="{competitionId: competitionId}" action="api/competitionservice/exam/examCard/importCardInfo" :headers="{'X-Token': $store.state.session.sessionid}" :on-change="handleUploadChange" :on-error="handleUploadError" :on-success="handleSuccess" :auto-upload="false" :multiple="false" :limit="1" accept=".xlsx" :before-upload="beforeAvatarUpload">
                      <el-button slot="trigger" size="small" type="primary">{{$t('label.selectFile')}}</el-button>
                      <span slot="tip" style="margin-left:10px">只能上传.xlsx文件</span>
                    </el-upload>
                    <div v-if="showImportTip" style="position:absolute;color:red">请上传导入文件!</div>
                  </el-form-item>
                </el-col>
              </el-row>
            </el-form>
          </el-col>
        </el-row>
      </edu-dialog>
    </div>
    <!-- 查看准考证 -->
    <div v-if="indexSee === 2" ref="msg" id="msg">
      <viewAdmissionCard :signUpId="signUpId" @change-exam-create-index="changeExamCreateIndex()"></viewAdmissionCard>
    </div>

  </div>
</template>
<script>
import { queryDic } from "common/src/api/dictionary";
import UTILS from "common/src/utils/utils";
import tools from 'common/src/views/underGraduationDesign/tools.js';
import graduateStudent from 'common/src/api/graduateStudent/graduateStudent';
import subjectCompetitionApi from 'common/src/api/subjectCompetition/subjectCompetition';
import viewAdmissionCard from '../mandarin/examsCreate/viewAdmissionCard';
export default {
  components: {
    viewAdmissionCard
  },
  data() {
    return {
      tips: 2,
      command:false,
      cardIds:[],
      indexSee: 1,
      indexKey: '1', // 面包屑
      title: '',
      addflag: false,
      useConfigParam: '',
      useConfigParamList: '',
      peopleadd: {},
      curRow: {},
      ifDetials: false,
      copyDialog: false,
      curCalendarId: '',
      isAllDel: true,
      multipleSelection: [],
      provideData: {}, // 提供子组件表格数据
      CardStatusList:[
        {
          value: 0,
          label: '未导入'
        },
        {
          value: 1,
          label: '导入'
        }
      ],
      queryForm: {
        pageNum_: 1,
        pageSize_: 20,
        total_: 0,
        condition: {
          calendarId: '',
          entranceYear: null,
          campus: '', // 校区
          college: '', // 学院
          major: '', // 专业
          subjectCode: '', // 科目
          competitionType: '', // 考试类型
          studentIdOrName: '', // 学号或姓名
          importCardStatus:'',
          examCategory: 6,
        }
      },
      dataListProp: {},
      dataProp: '',
      copyTime: {
        time: ''
      },
      competitionidlist: [],
      options: {
        TrainingLevel: [],
        degreeType: [],
        formLearning: [],
        faculty: [],
        limitCampus: [],
        profession: [],
        trainingCategory: []
      },
      calendarName: '',
      loadList: [],
      TrainingLevel: [],
      rules: {
        time: [
          {
            required: true,
            message: this.$t('graduate.optionRequired'),
            trigger: "change"
          }
        ]
      },
      dataList: [],
      collegeList: [],
      useConfigParamList: '',
      breadPath: {
        label: this.$t('graduate.graduate'),
        key: "1",
        children: [
          {
            key: "2",
            label: ""
          }
        ]
      },
      exportButton: false,
      exportResult: null,
      getListForm: {
        pageNum_: 1,
        pageSize_: 99,
        total_: 0,
        condition: {
          "educationTag": 1,
          "examCategory": 6,
        }
      },
      competitionidList: [],
      fileList: [], //导入文件
      showImportTip: false,
      competitionIdTip:false,
      competitionId: null
    }
  },
  created() {
    this.getOptions();
    this.computerExamType();

  },
  mounted() {
    if(this.queryForm.condition.calendarId){
      this.postInternshipSet(this.queryForm);
    }
  },
  methods: {
    computerExamType() {
      subjectCompetitionApi.computerExamTypeListNoPage({ subjectType: 1 }).then(res => {
        if (res.data) {
          res.data.forEach(el => {
            this.TrainingLevel.push({
              label: el.competitionType,
              value: el.subjectCode
            });
          });
        }
      })
    },
    getOptions() {
      // 筛选条件字典查询
      let data = {
        lang: this.$store.getters.language || "cn",
        type: "allChild",
        keys: ["X_PYCC", 'X_PYLB', 'X_XWLX', 'X_XXXS', 'X_YX', 'X_XQ']
      };
      queryDic(data).then(res => {
        UTILS.fillSelect(
          {
            trainingCategory: "X_PYLB",
            degreeType: "X_XWLX",
            formLearning: "X_XXXS",
            faculty: "X_YX",
            limitCampus: 'X_XQ',
            TrainingLevel: "X_PYCC"
          },
          res.data,
          this.options
        );
        this.options.limitCampus = this.options.limitCampus.filter(el => el.value == "1" || el.value == "3")
      });
    },
    onSubmit() {
      this.queryForm.pageNum_ = 1;
      this.postInternshipSet(this.queryForm);
    },
    // 学院选择
    collegeChange(val) {
      // if (!this.queryForm.condition.grade) {
      //   return false
      // }
      this.collegeList = []
      this.collegeList = [val];
      this.queryForm.condition.major = '';
      this.options.profession = []
      const data = {
        lang: this.$store.getters.language || "cn",
        type: "allChild",
        keys: ["G_ZY"],
        filter: {
          // prefix: this.collegeList,
          // specilaCode: "XY2ZY",
          grade: this.queryForm.condition.entranceYear,
          facultys: this.collegeList,
        }
      };
      queryDic(data).then(res => {
        if (res.code === 200) this._fill("profession", res.data.G_ZY);
      });
      // let collegeList = [val];
      // graduateStudent.getDegreeByCollege(collegeList).then(res => {
      //   this.options.profession = res.data;
      // });
    },
    // 年级选择
    collegeChangeList() {
      if (this.collegeList.length > 0) {

        this.queryForm.condition.major = '';
        this.options.profession = []
        const data = {
          lang: this.$store.getters.language || "cn",
          type: "allChild",
          keys: ["G_ZY"],
          filter: {
            // prefix: this.collegeList,
            // specilaCode: "XY2ZY",
            grade: this.queryForm.condition.entranceYear,
            facultys: this.collegeList,
          }
        };
        queryDic(data).then(res => {
          if (res.code === 200) this._fill("profession", res.data.G_ZY);
        });
      }

    },
    _fill(type, data) {
      for (const key in data) {
        this.options[type].push({
          value: key,
          label: data[key]
        });
      }
    },
    // 获取列表
    postInternshipSet(data) {
      subjectCompetitionApi.computerSignUpInfo(data).then(res => {
        // console.log(res, 'fdf');
        this.dataList = res.data.list;
        // this.queryForm.pageNum_ = res.data.pageNum_;
        // this.queryForm.pageSize_ = res.data.pageSize_;
        this.queryForm.total_ = res.data.total_;

      });
    },
    // 筛选
    onSearch() {
      this.queryForm.pageNum_ = 1;
      // this.loadList.forEach(el => {
      //   if (el.id === this.useConfigParam) {
      //     this.queryForm.condition.calendarName = el.fullName;
      //   }
      // });
      this.postInternshipSet(this.queryForm);
    },
    // 重置
    resetSearch() {
      this.options.profession = []
      this.queryForm.condition.calendarId = this.useConfigParamList;
      this.queryForm.condition.subjectCode = '';
      this.queryForm.condition.campus = '';
      this.queryForm.condition.college = '';
      this.queryForm.condition.major = '';
      this.queryForm.condition.entranceYear = '';
      this.queryForm.condition.studentIdOrName = '';
      this.queryForm.condition.importCardStatus = '';
      this.queryForm.pageNum_ = 1;
      this.postInternshipSet(this.queryForm);
    },

    loadDone(data, val) {
      //this.loadList = data;
      this.useConfigParamList = val;
      this.onSearch()
    },
    changeInput(val) {
    },
    initOptions() {
      innovativeApi.getAllFaculty().then(res => {
        this.options.facultys = res.data.map(item => {
          return {
            label: item.deptName,
            value: item.deptCode
          }
        });
      })
    },
    handleSelectionChange(val) {
      this.multipleSelection = val;
      this.cardIds=[];
      this.multipleSelection.forEach((item,index)=>{
        if(item.cardId){
          this.cardIds.push(item.cardId);
        }
      })
      this.cardIds=[...new Set(this.cardIds)];
    },
    // 轮询直到获取key值的接口返回
    cycleToGetKey() {
      setTimeout(() => {
        let currentIds = [];
        if (this.multipleSelection.length > 0) {
          this.multipleSelection.forEach((element) => {
            currentIds.push(element.id);
          });
        }
        subjectCompetitionApi.computerSignExport({
          "campus": this.queryForm.condition.campus,
          "calendarId": this.queryForm.condition.calendarId,
          "college": this.queryForm.condition.college,
          "major": this.queryForm.condition.major,
          "subjectCode": this.queryForm.condition.subjectCode,
          "competitionType": this.queryForm.condition.competitionType,
          "studentIdOrName": this.queryForm.condition.studentIdOrName,
          "selectRowIds": currentIds
        }).then(res => {
          if (res.success) {
            this.$refs.downloadRef.close();
            this.exportButton = false;
            this.normalDelayRequest(res.key, res.msg);
          } else {
            this.cycleToGetKey();
          }
        });
      }, 3000);
    },
    // 导出异步
    delayRequest(key, name) {
      setTimeout(() => {
        subjectCompetitionApi.downloadGetKey(key, name).then(res => {
          this.exportResult = res.data;
          if (res.code == 200 && res.data.status) {
            this.exportButton = false;
            let path =
              '/api/practiceservice/export/file?path=' +
              res.data.path + '&name=' + name;
            // window.open(path);
            window.location.href = path;
            this.$message.success(this.$t('result.exportSuccessfully'));
            this.$refs.downloadRef.close();
          } else {
            this.delayRequest(key, name);
          }
        });
      }, 3000);
    },
    // Normal导出异步
    normalDelayRequest(key, name) {
      setTimeout(() => {
        subjectCompetitionApi.downloadGetKey(key).then(res => {
          this.exportResult = res.data;
          if (res.code == 200 && res.data.status) {
            this.exportButton = false;
            let path =
              '/api/practiceservice/export/file?path=' +
              res.data.path + '&name=' + name;
            // window.open(path);
            window.location.href = path;
            this.$message.success(this.$t('result.exportSuccessfully'));
            this.$refs.downloadRef.close();
          } else {
            this.delayRequest(key, name);
          }
        });
      }, 3000);
    },
    // 导出
    exportAuditRoster() {
      let currentIds = [];
      if (this.multipleSelection.length > 0) {
        this.multipleSelection.forEach((element) => {
          currentIds.push(element.id);
        });
      }
      subjectCompetitionApi.computerSignExport({
        "campus": this.queryForm.condition.campus,
        "calendarId": this.queryForm.condition.calendarId,
        "college": this.queryForm.condition.college,
        "major": this.queryForm.condition.major,
        "subjectCode": this.queryForm.condition.subjectCode,
        "competitionType": this.queryForm.condition.competitionType,
        "studentIdOrName": this.queryForm.condition.studentIdOrName,
        "selectRowId": currentIds,
        "examCategory":6
      }).then(res => {
        this.$message({
          type: 'success',
          message: this.$t('studentsRegist.successfully')
        });
      })
      // 1、第一步：调该接口，获取key值以及msg中的文件名
      // 2、第二步：将key值放入接口传参
      // 3、第三步：传入path值以及name(msg中的文件名)值，下载文件
      // this.exportResult = null;
      // this.$refs.downloadRef.open();
      // this.exportButton = true;
      // this.cycleToGetKey();
    },
    // 处理导入
    handleCommand(command) {
      if (command && command === "import") {
        this.command=false;
        // 模板导入
        this.showImportTip = false;
        this.$refs.importDialog.open();
        this.$refs.upload && this.$refs.upload.clearFiles();
        this.fileList = [];
        this.getListData();
        // this.$refs.importBtn.click();
      } else if (command && command === "download") {
        // 模板下载
        this.downloadTemplate();
      }
    },
    handleImportConfirm() {
      if(this.command){
          let data = {
          competitionId: this.competitionId,
          cardIds:this.cardIds?this.cardIds:''
        }
        subjectCompetitionApi.exportBatch(data);
        this.$refs.importDialog.close();
      }else{
        if (this.competitionId==null||!this.competitionId||this.competitionId=='') {
          this.competitionIdTip = true
          return
        }else{
          this.competitionIdTip = false;
        }
        if (this.fileList.length == 0) {
          this.showImportTip = true
          return
        }
        this.$refs.upload.submit();
      }
    },
    //考试列表
    getListData() {
      this.competitionidList=[];
      this.getListForm.condition.calendarId=this.queryForm.condition.calendarId;
      subjectCompetitionApi.getPutonghuaExamsList(this.getListForm).then((res) => {
        var arr = [];
        arr = res.data.list;
        let obj = {};
        arr.forEach((item, index) => {
           if(!item.title&&!item.competitionType){
             item.title='';
          }else if(!item.title&&item.competitionType){
             item.title=item.competitionType
          }else if(item.title&&item.competitionType){
            item.title=item.title+'('+item.competitionType+')';
          }
          obj = {
            title: item.title?item.title:'',
            // competitionType: item.competitionType?item.competitionType:'',
            id:item.id,
          }
          this.competitionidList.push(obj)
        })
      })
    },
    // 模板下载
    downloadTemplate() {
      subjectCompetitionApi.downloadStudents();
    },
    handleUploadChange(file, fileList) {
      this.fileList = fileList;
      this.name = file.name;
      if (this.fileList.length > 0) {
        this.showImportTip = false
      }
    },
    handleUploadError(err) {
      this.$message({
        type: 'error',
        duration: 5000,
        message: err
      })
    },
    // 上传成功
    handleSuccess(res, file, fileList) {
      // console.log(res, file, fileList);
      if (!file.name.endsWith(".xlsx") && !file.name.endsWith(".xls")){
        this.fileList = [];
        return this.$message.warning(this.$t('cetStatistics.formatError'))

      }
      if(res.code!=200) {
        this.fileList = [];
        this.$message(res.msg);
      } else {
        this.$message.success(this.$t('studentsRegist.successfully'));
        this.getListForm.pageNum_ = 1;
        this.showImportTip = false;
        this.$refs.importDialog.close();
        this.fileList = [];
      }
      this.onSearch();
    },
    //导入文件成功后
    handleUploadDone(res) {
      if (res.code == 200) {
        let loading = this.$loading({
          lock: true,
          text: 'Loading',
          spinner: 'el-icon-loading',
          background: 'rgba(255, 255, 255, .48)'
        })
        //this.delayImportRequest(res.data.key, loading)
      }
    },
    async delayImportRequest(key, loading) {
      await new Promise(resolve => setTimeout(resolve, 3000))
      api.getImportStatus(key)
        .then(res => {
          if (res.code == 200 && res.data.status) {
            loading.close()
            if (res.data.success) {
              this.$message({
                type: 'success',
                message: '导入成功'
              })
              this.$refs.importDialog.close()
              this.searchList()
            } else {
              this.$refs.upload.clearFiles()
              this.fileList.length = 0
              let msg = res.data.msg || '导入失败'
              this.$message({
                type: 'error',
                message: msg + ',请重新导入'
              })
            }
          } else {
            this.delayImportRequest(key)
          }
        })
        .catch(ex => {
          this.delayImportRequest(key)
        })
    },
    beforeAvatarUpload(file) {
      const isLt2M = file.size / 1024 / 1024 < 10
      if (!isLt2M) {
        this.$message.error('导入文件大小不能超过10MB')
        this.$refs.upload.clearFiles()
        return false
      }
      if (file.name.substring(file.name.lastIndexOf('.')).toLowerCase() != '.xlsx') {
        this.$message.error('导入文件错误')
        this.$refs.upload.clearFiles()
        return false
      }
    },

    competitionIdChange(val){
    },
    // 准考证批量打印
    batchClick() {
      this.command=true;
      this.getListData();
      this.$refs.importDialog.open();
    },
    //查看准考证
    SeeClick(rows) {
      this.signUpId=rows;
      this.indexSee = 2;
    },
    // 返回列表页
    changeExamCreateIndex() {
      this.indexSee = 1;
    },
    dialogClose() {
      this.copyDialog = false;
      this.$refs['copyTime'].resetFields();
    },
    handleSizeChange(val) {
      this.queryForm.pageNum_ = 1;
      this.queryForm.pageSize_ = val;
      this.postInternshipSet(this.queryForm);
    },
    handleCurrentChange(val) {
      this.queryForm.pageNum_ = val;
      this.postInternshipSet(this.queryForm);
    },
    reset() {
      for (const key in this.queryForm.condition) {
        if (key != 'calendarId') {
          this.queryForm.condition[key] = "";
        }
      }
      this.queryForm.condition.faculty = '';
      this.queryForm.condition.status = '';
      this.queryForm.condition.calendarId = this.useConfigParamList;
      this.queryForm.pageNum_ = 1;
      this.postInternshipSet(this.queryForm);
      // this.queryForm.condition.calendarId = this.curCalendarId;
      // this.onSubmit();
    },
  }

}
</script>
<style lang="scss" scoped>
.condition-title {
    color: #2b3b4e;
    font-size: 18px;
    line-height: 24px;
    font-weight: bold;
}
.edu-page-title {
    span {
        line-height: 24px;
        display: inline-block;
        padding-right: 10px;
        font-size: 18px;
        font-weight: bold;
        color: #2b3b4e;
    }
}
.sub-title {
    margin: 16px 0;
    font-size: 16px;
    color: #000020;
    letter-spacing: 0;
}
.form-item {
    width: 312px;
    height: 32px;
    float: left;
    margin: 0px 10px;
}
.inputBox {
    width: 240px !important;
    height: 32px !important;
}
.atooltip {
    background: beige;
    border: black;
}
</style>
<style>
.importDialogClass .el-form-item__label{
  position: relative;
  margin-left: 8px;
}
.importDialogClass .spanClass{
  position: absolute;
  top: 10px;
  left: 0;
  color: red;
}
</style>
